import{createRouter,createWebHistory} from 'vue-router'
const router = createRouter({
    history:createWebHistory(import.meta.env.BASE_URL),
    routes:[
        {
            path:'/',
            name:'welcome',
            redirect: '@/views/welcome/LoginPage.vue',
            component:()=>import('@/views/WelcomeView.vue'),
            children:[
                {
                    path:'',
                    name:'welcome-login',
                    component:()=>import('@/views/welcome/LoginPage.vue')
                },
                {
                    path: '',
                    name: 'welcome-home',
                    component:()=>import('@/views/welcome/home.vue'),
                    meta: {
                        keepAlive: false // 设置为false表示不缓存该页面，每次访问都重新加载渲染
                    }
                }
            ]
        }
    ]
})
export default router